home *** CD-ROM | disk | FTP | other *** search
/ Aminet 38 / Aminet 38 (2000)(Schatztruhe)[!][Aug 2000].iso / Aminet / util / misc / BFLocalizer.lha / BFLocalizer / Autodocs / snoopstrings.doc < prev    next >
Encoding:
Text File  |  2000-05-04  |  6.9 KB  |  186 lines

  1. TABLE OF CONTENTS
  2.  
  3. SnoopStrings
  4. SnoopStrings/Description_File
  5. SnoopStrings/Filter
  6. SnoopStrings/History
  7. SnoopStrings                                                       SnoopStrings
  8.  
  9.  NAME
  10.      SnoopStrings -- Extracts strings from (binary) file
  11.  
  12.  SYNOPSIS
  13.      SnoopStrings
  14.      FILE/A,TO/A,FILTER/A/K,EXCLUDE/K,INCLUDE/K,STRLEN/N,NOEOS/S,QUIET/S
  15.  
  16.  FUNCTION
  17.      The purpose of SnoopStrings command is to search string candidates
  18.      from binary files and write a report (description file) of its
  19.      findings.
  20.      SnoopStrings command uses four methods to identify a string: legal
  21.      characters, EOS mark, continuity and lenght of a string.
  22.      Legal characters (or readable characters) can be defined in a filter
  23.      file. When you invoke SnoopStrings, you must supply the name of the
  24.      filter file (see FILTER parameter) being used. Through reading the
  25.      filter SnoopStrings knows which characters are readable (legal string
  26.      characters) and which are not.
  27.      End Of String mark (EOS) is usually used for identifying the end of
  28.      strings. By default SnoopStrings accepts only byte streams ending with
  29.      EOS as strings. This requirement can be turned off with the NOEOS
  30.      option.
  31.      Continuity of a string means that its byte sequence may contain only
  32.      legal characters so that sequence is uninterrupted. This may sound more
  33.      complicated than it is. In other words, illegal characters are not
  34.      allowed within a string. For example, if character $ is not a legal
  35.      character and we have a following EOS-ending string, which is, by the
  36.      way, not true:
  37.  
  38.          'I was paid $10 for writing SnoopStrings.'
  39.  
  40.      SnoopStrings will see it as follows:
  41.  
  42.          '10 for writing SnoopStrings.'
  43.  
  44.      As an illegal character the $ sign splits the string into two halves.
  45.      The first half is not accepted and recognized because of a missing EOS
  46.      mark.
  47.      String length is used for cutting off short and meaningless strings.
  48.      String '3r' with EOS mark is probably not a string but a piece of
  49.      program code which happens to have string characteristics. By default
  50.      SnoopStrings uses a minimum string length of 3. You can alter the string
  51.      length with STRLEN parameter.
  52.      When you use SnoopStrings, you will notice that it finds a lot of
  53.      strings which, in fact, are not strings at all. SnoopStrings reduces
  54.      your work but does not eliminate it.
  55.  
  56.  INPUTS
  57.      FILE/A     - name of the (binary) file to be examined
  58.      TO/A       - name of the output file (description file)
  59.      FILTER/A/K - name of the filter file
  60.      EXCLUDE/K  - characters to be omitted despite of the filter.
  61.                   8-bit hexadecimal numbers.
  62.      INCLUDE/K  - characters to be accepted despite of the filter.
  63.                   8-bit hexadecimal numbers.
  64.      STRLEN/N   - minimum length of a string. Strings shorter than this are
  65.                   not considered as string.
  66.      NOEOS/S    - do not search for end of string marks (EOS). By default
  67.                   every string must end to an EOS mark
  68.      QUIET/S    - no progress report
  69.  
  70.  RESULT
  71.      The search result will be written into a named description file.
  72.  
  73.  EXAMPLE
  74.      SnoopStrings snoopstrings to RAM:snoopstrings.dsc FILTER usa.flt
  75.  
  76.          Extracts strings from the binary file 'snoopstrings' and writes
  77.          string descriptions into an ASCII file named as 'snoopstrings.dsc'.
  78.  
  79.      SnoopStrings list to RAM:list.dsc FILTER usa.flt INCLUDE 09A9AE
  80.  
  81.          Extracts strings from the binary file 'list' and writes string
  82.          descriptions into an ASCII file named as 'list.dsc'. Parameter
  83.          INCLUDE defines characters which as hexadecimal ASCII codes are 09,
  84.          A9, and AE as valid string characters.
  85.  
  86.  BUGS
  87.      None known.
  88.  
  89.  SEE ALSO
  90.      WriteStrings
  91.      Description_File
  92.      Filter
  93.  
  94. SnoopStrings/Description_File                     SnoopStrings/Description_File
  95.  
  96.  DESCRIPTION FILE
  97.      SnoopString command stores found strings into a description file.
  98.      Description file is an ASCII file containing string descriptions. It can
  99.      be edited by using ordinary text editor.
  100.  
  101.  FILE FORMAT
  102.      <signature>\n<address> <str_length> <flags> <values> <string>
  103.  
  104.      <signature>  - description file signature. For version 1.0 it is:
  105.                     SNS0100DESC
  106.      \n           - new line code
  107.      <address>    - string's hexadecimal start address in a file
  108.                     (relative to the beginning of a file)
  109.      <str_length> - string length (hexadecimal value)
  110.      <flags>      - write flags
  111.      <values>     - string in 8-bit hexadecimal codes (two digits). Each code
  112.                     is separated with space
  113.      <string>     - string in characters. EOS mark is not printed but the hex
  114.                     code is present
  115.  
  116.  FLAGS
  117.      Flags are instructions to WriteStrings command, describing how altered
  118.      strings should be written into the target file. There are three kinds of
  119.      flags:
  120.  
  121.          -   no operation: Do not touch to the corresponding byte
  122.          ?   write character: Set byte according to a character
  123.          .   end of string: Sets EOS mark despite of character or hex value
  124.          #   write code: Set byte according to byte's hex value
  125.  
  126.      When flag '-' is used, WriteStrings just copies a byte from the original
  127.      file, not changing it in any way. Flag '?' commands WriteStrings to
  128.      write the altered character into the target file. Programs usually
  129.      require an EOS mark at the end of each string. You can set the EOS with
  130.      the flag '.'. '#' flag does the same as '?' flag except that instead of
  131.      the altered character, the altered hex value will be written into the
  132.      target file.
  133.  
  134.  EXAMPLES
  135.      The following string description has been written into a description
  136.      file:
  137.  
  138.  00000C9A 000C ???????????. 53 4E 53 30 31 30 30 44 45 53 43 00 SNS0100DESC
  139.  
  140.      If you want to change the string to 'SNS21DESC', the following
  141.      modifications are required:
  142.  
  143.  00000C9A 000C ?????????... 53 4E 53 30 31 30 30 44 45 53 43 00 SNS21DESC
  144.  
  145.  NOTES
  146.      Never write extra bytes to the string. It is very important that string
  147.      length remains the same. By writing a longer string you always overwrite
  148.      something. It might be a another string or a program code.
  149.  
  150. SnoopStrings/Filter                                         SnoopStrings/Filter
  151.  
  152.  FILTER
  153.      In a filter file you can enumerate valid characters, i.e. characters to
  154.      be accepted as a part of a string.
  155.  
  156.  FILE FORMAT
  157.      <signature> <values>
  158.  
  159.      <signature> - filter file signature. For version 1.0 it is: SNS0100FILT
  160.      <values>    - character codes (8-bit hexadecimal values) separated by a
  161.                    space. Two digits are required
  162.  
  163.  EXAMPLES
  164.      SNS0100FILT 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
  165.  
  166. SnoopStrings/History                                       SnoopStrings/History
  167.  
  168.  VERSION
  169.      1.0
  170.  
  171.  DATE
  172.      01.05.2000
  173.  
  174.  COMMENT
  175.      First release.
  176.  
  177.  NEW
  178.      -
  179.  
  180.  CHANGED
  181.      -
  182.  
  183.  REMOVED
  184.      -
  185.  
  186.